//
//  CollectTableViewCell.swift
//  NDAi
//
//  Created by 丸子 on 2024/6/20.
//

import UIKit

class CollectTableViewCell: UITableViewCell {
 
    lazy var content: UIView = {
        let view = UIView()
        view.allRound(8)
        view.backgroundColor = UIColor.white
        return view
    }()
    
    lazy var contentLb: UILabel = {
        let label = UILabel()
        label.font = UIFont.pingFangSCRegular(ofSize: 14)
        label.textColor = Theme.color.text_d1
        label.text = ""
        label.numberOfLines = 3
        return label
    }()
    
    private lazy var copyBtn: UIButton = {
        let button = UIButton(type: .custom)
        button.normalImage = UIImage(named: "icon_collect_copy")
        button.titleFont = UIFont.pingFangSCMedium(ofSize: 16)
        return button
    }()
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.backgroundColor = .clear
        self.selectionStyle = .none
        self.contentView.addSubviews([content, contentLb, copyBtn])
        
        content.snp.makeConstraints { make in
            make.top.equalTo(contentLb.snp.top).offset(-15)
            make.leading.trailing.equalToSuperview().inset(15)
            make.bottom.equalTo(contentLb.snp.bottom).offset(33)
        }
        
        contentLb.snp.makeConstraints { make in
            make.top.leading.trailing.equalToSuperview().inset(30)
            make.bottom.equalToSuperview().offset(-44)
        }
        
        
        copyBtn.snp.makeConstraints { make in
            make.top.equalTo(contentLb.snp.bottom).offset(6)
            make.trailing.equalToSuperview().offset(-24)
            make.width.height.equalTo(27)
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

 
  

}
